home *** CD-ROM | disk | FTP | other *** search
- #
- | This is the C run-time start-off routine. It's job is to take the
- | arguments as put on the stack by EXEC, and to parse them and set them up the
- | way _main expects them.
-
- | public labels
- .globl _environ
- | external references
- .globl __main
- .globl _exit
- .globl _etext
- .globl _edata
- .globl _end
- .text
- .even
- start:
- movl sp,a0
- movl a0@+,d0 | .long due to lib/exec.c and mm/exec.c
- movl d0,d1
- addl #1,d1
- asll #2,d1 | pointers are four .bytes on 68000
- movl a0,a1
- addl d1,a1
- movl a1,_environ | save envp in environ
- movl a1,sp@- | push environ
- movl a0,sp@- | push argv
- movl d0,sp@- | push argc
- jsr __main
- addw #12,sp
- | should never come here
- L0: jra L0
-
- .data
- .even
- _environ:
- .long 0
-